.app-container {
  background-color: #0D1B2A;
  color: #FFFFFF;
  font-family: 'Arial', sans-serif;
  height: calc(100vh - 84px);
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.main-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
  overflow: hidden;
}

.upper-section {
  display: flex;
  flex: 0 0 auto;
  height: 60%;
  gap: 10px;
  min-height: 0;
}

.lower-section {
  flex: 1;
  display: flex;
  gap: 10px;
  min-height: 0;
}

.column {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  min-height: 0;
}

.left-column {
  flex: 1;
}

.middle-column {
  flex: 1;
}

.right-column {
  flex: 1;
}

.card {
  background-color: #102A43;
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.upper-card {
  flex: 1;
  min-height: 0;
}

.lower-card {
  flex: 1;
  min-height: 0;
}

.full-height-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.full-width-card {
  flex: 1;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.section-title {
  font-size: 16px;
  text-transform: uppercase;
  color: #50784b;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.value {
  font-size: 16px;
  color: #69A2B0;
  margin: 3px 0;
}

.unit {
  font-size: 10px;
  margin: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  text-align: center;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: center;
  flex: 1;
}

.vital-signs-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  text-align: center;
  flex: 1;
  gap: 8px;
}

.health-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  flex: 1;
}

.index-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background-color: rgba(80, 120, 75, 0.2);
  border-radius: 4px;
}

.index-item span:first-child {
  flex: 1;
  text-align: left;
  font-size: 12px;
}

.index-item .value {
  flex: 0;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.body-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.body-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  align-self: center;
}

.vital-chart-container {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.vital-info {
  display: flex;
  flex-direction: column;
  width: 120px;
  flex: 0 0 auto;
  justify-content: center;
  gap: 15px;
}

.vital-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(80, 120, 75, 0.2);
  padding: 8px;
  border-radius: 6px;
}

.vital-icon {
  width: 32px;
  height: 32px;
}

.value {
  font-size: 16px;
  color: #69A2B0;
  margin: 0;
  font-weight: bold;
}

.spacer {
  display: none;
}

.chart-container {
  flex: 1;
  min-height: 0;
  position: relative;
}

.chart {
  width: 100%;
  height: 100%;
  min-height: 120px;
  position: absolute;
  top: 0;
  left: 0;
}

.el-card {
  color: #d3dce6;
  height: 100%;
}

/* Gauge styles */
.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
}

.gauge-container-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
}

.gauge-title {
  font-size: 12px;
  margin-bottom: 4px;
}

.gauge-title-small {
  font-size: 10px;
  margin-bottom: 2px;
}

.gauge-wrapper {
  width: 100%;
  position: relative;
  margin-bottom: 4px;
}

.gauge-wrapper-small {
  width: 100%;
  position: relative;
  margin-bottom: 2px;
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  margin-bottom: 2px;
  padding: 0 1px;
}

.gauge-labels-small {
  display: flex;
  justify-content: space-between;
  font-size: 6px;
  margin-bottom: 1px;
  padding: 0 1px;
}

.gauge-track {
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  background-color: #2c3e50;
}

.gauge-track-small {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  background-color: #2c3e50;
}

.gauge-fill {
  height: 100%;
  float: left;
}

.gauge-fill-small {
  height: 100%;
  float: left;
}

.gauge-fill.normal {
  background-color: #50C878;
  /* 绿色表示正常 */
}

.gauge-fill.warning {
  background-color: #FFD700;
  /* 黄色表示警告 */
}

.gauge-fill.danger {
  background-color: #FF6347;
  /* 红色表示危险 */
}

.gauge-marker {
  position: absolute;
  top: -2px;
  width: 3px;
  height: 14px;
  background-color: #fff;
  transform: translateX(-50%);
  z-index: 10;
}

.gauge-marker-small {
  position: absolute;
  top: -1px;
  width: 2px;
  height: 8px;
  background-color: #fff;
  transform: translateX(-50%);
  z-index: 10;
}

.gauge-value {
  font-size: 14px;
  font-weight: bold;
  margin-top: 2px;
}

.gauge-value-small {
  font-size: 10px;
  font-weight: bold;
  margin-top: 1px;
}

.gauge-unit {
  font-size: 8px;
}

.gauge-unit-small {
  font-size: 6px;
}

.gauge-fill-small.low {
  background-color: #FF6347;
  /* 红色表示低 */
}

.gauge-fill-small.normal {
  background-color: #50C878;
  /* 绿色表示正常 */
}

.gauge-fill-small.high {
  background-color: #FF6347;
  /* 红色表示高 */
}

.low-value {
  color: #FF6347;
}

.normal-value {
  color: #50C878;
}

.high-value {
  color: #FF6347;
}

/* 响应式设计 */
@media screen and (max-width: 1920px) and (max-height: 1080px) {
  .app-container {
    padding: 8px;
    height: calc(100vh - 84px);
  }

  .main-layout {
    gap: 8px;
  }

  .upper-section {
    height: 60%;
    gap: 8px;
  }

  .lower-section {
    gap: 8px;
  }

  .card {
    padding: 10px;
  }

  .section-title {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .value {
    font-size: 15px;
  }

  .info-grid {
    gap: 5px;
  }

  .data-grid {
    gap: 6px;
  }

  .health-index-grid {
    gap: 6px;
  }

  .vital-info {
    width: 110px;
    gap: 12px;
  }

  .vital-icon {
    width: 30px;
    height: 30px;
  }

  .gauge-container {
    padding: 5px;
  }

  .gauge-title {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .gauge-track {
    height: 8px;
  }

  .gauge-marker {
    top: -2px;
    height: 12px;
  }

  .gauge-value {
    font-size: 13px;
    margin-top: 2px;
  }

  .gauge-unit {
    font-size: 7px;
  }

  .chart {
    min-height: 110px;
  }

  .data-item {
    padding: 4px;
  }

  .vital-item {
    padding: 4px;
  }

  .index-item {
    padding: 5px 6px;
  }

  .index-item span:first-child {
    font-size: 11px;
  }

  .index-item .value {
    font-size: 14px;
  }

  .body-image-container {
    padding: 8px;
  }
}

@media screen and (max-width: 1366px) and (max-height: 768px) {
  .app-container {
    padding: 6px;
    height: calc(100vh - 80px);
  }

  .main-layout {
    gap: 6px;
  }

  .upper-section {
    height: 60%;
    gap: 6px;
  }

  .lower-section {
    gap: 6px;
  }

  .card {
    padding: 8px;
  }

  .section-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .value {
    font-size: 14px;
  }

  .unit {
    font-size: 9px;
  }

  .info-grid {
    gap: 4px;
  }

  .data-grid {
    gap: 5px;
  }

  .health-index-grid {
    gap: 5px;
  }

  .index-item {
    padding: 4px 6px;
  }

  .index-item span:first-child {
    font-size: 10px;
  }

  .index-item .value {
    font-size: 13px;
  }

  .vital-info {
    width: 100px;
    gap: 10px;
  }

  .vital-icon {
    width: 28px;
    height: 28px;
  }

  .gauge-container {
    padding: 4px;
  }

  .gauge-title {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .gauge-track {
    height: 7px;
  }

  .gauge-marker {
    top: -1px;
    height: 9px;
  }

  .gauge-value {
    font-size: 12px;
    margin-top: 1px;
  }

  .gauge-unit {
    font-size: 7px;
  }

  .gauge-container-small {
    padding: 3px;
  }

  .gauge-title-small {
    font-size: 8px;
    margin-bottom: 1px;
  }

  .gauge-track-small {
    height: 5px;
  }

  .gauge-marker-small {
    top: -1px;
    height: 7px;
  }

  .gauge-value-small {
    font-size: 9px;
    margin-top: 1px;
  }

  .gauge-unit-small {
    font-size: 6px;
  }

  .chart {
    min-height: 100px;
  }

  .data-item {
    padding: 3px;
  }

  .vital-item {
    padding: 3px;
  }

  .body-image-container {
    padding: 6px;
  }
}

@media screen and (max-width: 1280px) and (max-height: 720px) {
  .app-container {
    padding: 5px;
    height: calc(100vh - 75px);
  }

  .main-layout {
    gap: 5px;
  }

  .upper-section {
    height: 60%;
    gap: 5px;
  }

  .lower-section {
    gap: 5px;
  }

  .card {
    padding: 7px;
  }

  .section-title {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .value {
    font-size: 13px;
  }

  .info-grid {
    gap: 3px;
  }

  .data-grid {
    gap: 4px;
  }

  .health-index-grid {
    gap: 4px;
  }

  .vital-info {
    width: 90px;
    gap: 8px;
  }

  .gauge-container {
    padding: 3px;
  }

  .gauge-title {
    font-size: 9px;
  }

  .gauge-track {
    height: 6px;
  }

  .gauge-marker {
    height: 8px;
  }

  .gauge-value {
    font-size: 11px;
  }

  .chart {
    min-height: 90px;
  }

  .data-item {
    padding: 2px;
  }

  .vital-item {
    padding: 2px;
  }

  .body-image-container {
    padding: 5px;
  }
}

/* 针对小屏幕设备的优化 */
@media screen and (max-width: 768px) {
  .app-container {
    padding: 10px 5px;
    height: calc(100vh - 70px);
  }

  .main-layout {
    flex-direction: column;
    gap: 10px;
  }

  .upper-section,
  .lower-section {
    flex: none;
    flex-direction: column;
    gap: 10px;
    height: auto;
  }

  .column {
    flex: none;
    width: 100%;
  }

  .card {
    min-height: auto;
  }

  .full-height-card,
  .full-width-card {
    height: auto;
  }

  .vital-chart-container {
    flex-direction: column;
  }

  .vital-info {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    margin-bottom: 15px;
  }

  .health-index-grid {
    grid-template-columns: 1fr;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .body-image-container {
    padding: 10px;
  }
}

/* 1080p 特殊优化 */
@media screen and (min-width: 1920px) and (min-height: 1080px) {
  .app-container {
    padding: 12px;
    height: calc(100vh - 84px);
  }

  .main-layout {
    gap: 10px;
  }

  .upper-section {
    height: 60%;
    gap: 10px;
  }

  .lower-section {
    gap: 10px;
  }

  .card {
    padding: 14px;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .value {
    font-size: 18px;
  }

  .info-grid {
    gap: 8px;
  }

  .data-grid {
    gap: 10px;
  }

  .health-index-grid {
    gap: 10px;
  }

  .vital-info {
    width: 140px;
    gap: 18px;
  }

  .vital-icon {
    width: 36px;
    height: 36px;
  }

  .gauge-container {
    padding: 8px;
  }

  .gauge-title {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .gauge-track {
    height: 12px;
  }

  .gauge-marker {
    top: -2px;
    height: 16px;
  }

  .gauge-value {
    font-size: 15px;
    margin-top: 3px;
  }

  .gauge-unit {
    font-size: 9px;
  }

  .chart {
    min-height: 140px;
  }

  .data-item {
    padding: 6px;
  }

  .vital-item {
    padding: 6px;
  }

  .index-item {
    padding: 7px 8px;
  }

  .index-item span:first-child {
    font-size: 13px;
  }

  .index-item .value {
    font-size: 17px;
  }

  .body-image-container {
    padding: 12px;
  }
}

/* 确保内容不被遮挡 */
.chart-container,
.vital-chart-container,
.full-width-card {
  overflow: hidden;
}

.chart {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

/* 修复底部被遮挡问题 */
.app-container {
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
}

/* 隐藏滚动条 */
.data-grid,
.vital-signs-grid,
.health-index-grid {
  overflow-y: hidden;
}

/* 新增 - 布局切换按钮样式 */

/* 布局切换按钮样式 */
.app-container {
  position: relative;
}

.layout-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 1000;
}

.layout-btn {
  background-color: #102A43;
  color: #FFFFFF;
  border: 1px solid #50784b;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
}

.layout-btn:hover {
  background-color: #50784b;
}

.layout-btn.active {
  background-color: #50784b;
  border-color: #50C878;
}

/* 小屏布局 */
.layout-small {
  font-size: 12px;
}

.layout-small .section-title {
  font-size: 14px;
}

.layout-small .value {
  font-size: 14px;
}

.layout-small .gauge-title {
  font-size: 10px;
}

.layout-small .gauge-value {
  font-size: 12px;
}

.layout-small .chart {
  min-height: 100px;
}

/* 中屏布局 */
.layout-medium {
  font-size: 14px;
}

.layout-medium .section-title {
  font-size: 16px;
}

.layout-medium .value {
  font-size: 16px;
}

.layout-medium .gauge-title {
  font-size: 12px;
}

.layout-medium .gauge-value {
  font-size: 14px;
}

.layout-medium .chart {
  min-height: 120px;
}

/* 大屏布局 - 优化显示效果 */
.layout-large {
  font-size: 16px;
  padding: 15px;
}

.layout-large .main-layout {
  gap: 15px;
}

.layout-large .upper-section {
  gap: 15px;
}

.layout-large .card {
  padding: 20px;
  border-radius: 12px;
  background-color: rgba(16, 42, 67, 0.95);
}

.layout-large .section-title {
  font-size: 20px;
  margin-bottom: 15px;
  color: #50C878;
  letter-spacing: 1px;
}

.layout-large .value {
  font-size: 22px;
  color: #69A2B0;
  font-weight: bold;
}

.layout-large .unit {
  font-size: 14px;
}

.layout-large .info-grid {
  gap: 10px;
  margin-top: 10px;
}

.layout-large .data-grid {
  gap: 15px;
}

.layout-large .health-index-grid {
  gap: 12px;
}

.layout-large .index-item {
  padding: 10px 12px;
  font-size: 14px;
}

.layout-large .index-item .value {
  font-size: 20px;
}

.layout-large .vital-info {
  width: 150px;
  gap: 20px;
}

.layout-large .vital-icon {
  width: 40px;
  height: 40px;
}

/* 大屏的仪表盘样式优化 */
.layout-large .gauge-container {
  padding: 12px;
}

.layout-large .gauge-title {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: bold;
}

.layout-large .gauge-wrapper {
  margin-bottom: 8px;
}

.layout-large .gauge-labels {
  font-size: 12px;
  margin-bottom: 4px;
}

.layout-large .gauge-track {
  height: 15px;
  border-radius: 8px;
}

.layout-large .gauge-marker {
  top: -4px;
  width: 5px;
  height: 23px;
  background-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.layout-large .gauge-value {
  font-size: 24px;
  margin-top: 5px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(105, 162, 176, 0.5);
}

.layout-large .gauge-unit {
  font-size: 12px;
  margin-top: 2px;
}

/* 大屏的小仪表盘样式 */
.layout-large .gauge-container-small {
  padding: 8px;
}

.layout-large .gauge-title-small {
  font-size: 14px;
  margin-bottom: 4px;
}

.layout-large .gauge-track-small {
  height: 10px;
  border-radius: 5px;
}

.layout-large .gauge-marker-small {
  top: -2px;
  width: 4px;
  height: 14px;
  background-color: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.layout-large .gauge-value-small {
  font-size: 18px;
  margin-top: 3px;
  font-weight: bold;
}

.layout-large .gauge-unit-small {
  font-size: 10px;
}

.layout-large .chart {
  min-height: 200px;
}

/* 人体图示优化 */
.layout-large .body-image-container {
  padding: 20px;
  background-color: rgba(80, 120, 75, 0.1);
  border-radius: 8px;
}

.layout-large .body-image {
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.3s;
}

.layout-large .body-image:hover {
  transform: scale(1.02);
}

/* 生命体征图表容器优化 */
.layout-large .vital-chart-container {
  padding: 15px;
  background-color: rgba(80, 120, 75, 0.1);
  border-radius: 8px;
}

/* 针对非常大的屏幕的额外调整 */
@media screen and (min-width: 2560px) {
  .layout-large {
    padding: 20px;
  }

  .layout-large .card {
    padding: 25px;
  }

  .layout-large .section-title {
    font-size: 24px;
  }

  .layout-large .value {
    font-size: 28px;
  }

  .layout-large .gauge-title {
    font-size: 18px;
  }

  .layout-large .gauge-value {
    font-size: 30px;
  }

  .layout-large .chart {
    min-height: 250px;
  }
}